-- mine_hill
-- created by panyl
-- 地牢格子：矿山

return {
    restoreGrid = function(grid, info)
        -- 还原选项
        if type(info["times"]) == "number" then
            grid.times = info["times"];
        end
    end,

    collectContext = function(grid)
        return {["times"] = grid.times};
    end,

    autoFight = function(grid)
        local pos = grid:getPos();
        if MineHillM.canMining(pos) then
            return DungeonActionM.go("mining_diamond", pos);
        end
        return false;
    end,
};
